package com.doeis.push;

import java.util.ArrayList;
import java.util.List;

import com.voland.core.db.Dao;
import com.voland.core.db.DaoException;

public class PushBaiduDao extends Dao {

	public PushBaidu findPushBaiduByid(Object id) throws DaoException{
		try{
			return super.readById(PushBaidu.class, id);
		}catch (Exception e) {
			throw new DaoException(e);
		}
	}
	
	public List<PushBaidu> findSalePlanBaidu(PushBaidu form) throws DaoException{
		StringBuffer sql = new StringBuffer("select ");
		sql.append(" * from push_baidu ");
		List<Object> params = new ArrayList<Object>();
		try{
			return query(PushBaidu.class, sql.toString(), params.toArray());
		}catch (Exception e) {
			throw new DaoException("查询推送信息出错",e);
		}
	}
	
}
